# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=winhex
pkgver=20.4
pkgrel=1
pkgdesc='Hex Editor and Disk Editor.'
groups=('blackarch' 'blackarch-windows')
arch=('any')
url='https://www.x-ways.net/winhex/'
source=("http://www.x-ways.net/$pkgname.zip")
sha512sums=('f5fa62dc39f380971e1930733989b0009beb771ae5faebded6f19de2ccb0a042b13a91c9d3a6cc029a3ded5b89336b974b1fd76e05dc82733049e3db87c9d6d9')

pkgver() {
  ver=$(curl -s 'https://www.x-ways.net/winhex/' | grep 'strong>WinHex ' |
    sed -r 's/.*WinHex ([0-9]+\.[0-9]+).*/\1/gi')

  echo "$ver"
}

package() {
  install -dm 755 "$pkgdir/usr/share/windows/$pkgname"

  cp --no-preserve=ownership * "$pkgdir/usr/share/windows/$pkgname/"
}

